package com.punai.system.service;


import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.PostRequest;
import com.punai.common.bos.RestResponse;
import com.punai.system.bo.GetPermissionVo;
import com.punai.system.bo.LoginGJUser;
import com.punai.system.bo.LoginUserRes;

import java.util.List;
import java.util.Map;

@BaseRequest(
        baseURL = "${verify_ip}" + "/external/api/permission"
)
public interface ApiRequest {

    @PostRequest( url =  "/login" )
    RestResponse<LoginUserRes> login(@JSONBody LoginGJUser loginUser);

    @PostRequest( url =  "/logout" )
    RestResponse<Map<String,String>> logout(@JSONBody LoginGJUser logoutUser);

    @PostRequest( url =  "/getPermissions" )
    RestResponse<Map<String, List<String>>> getPermission(@JSONBody GetPermissionVo permissionVo);

    @PostRequest( url =  "/getAllPermissions" )
    RestResponse<Map<String,Map<String, String>>> getAllPermission();
}
